﻿@{
    Layout = null;
}

@using FastReport;
@using FastReport.Web;
@using Git.Storage.Common;

<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    @Html.Partial("_PageTitle")
    @WebReportGlobals.Styles()
    @WebReportGlobals.Scripts()
</head>
<body class="fixed-top">

    @Html.Partial("_Header")

    <div id="container" class="row-fluid @ViewBag.MenuStatus">
        @Html.Partial("_Sidebar")

        <div id="body">
            <div id="widget-config" class="modal hide">
                <div class="modal-header">
                    <button data-dismiss="modal" class="close" type="button">×</button>
                    <h3>Widget Settings</h3>
                </div>
                <div class="modal-body">
                    <p>Here will be a configuration form</p>
                </div>
            </div>
            <div class="container-fluid">
                <div class="row-fluid">
                    <div class="span12">
                        @Html.Raw(ViewBag.NavMenu)
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span12">
                        <div class="widget box light-grey">
                            <div class="widget-title">
                                <h4><i class="icon-globe"></i>查看报表</h4>
                            </div>
                            <div class="widget-body">

                                <div class="row-fluid">
                                    <form class="form-horizontal" action="javascript:void(0)">
                                        <div class="control-group">
                                            <div data-condition="search">
                                                <input type="hidden" id="txtReportNum" name="txtReportNum" value="@ViewBag.Entity.SnNum" />
                                                @if ((ViewBag.ListParam as List<Git.Storage.Entity.Report.ReportParamsEntity>).Count > 0)
                                                {
                                                    foreach (Git.Storage.Entity.Report.ReportParamsEntity item in ViewBag.ListParam)
                                                    {
                                                        @item.ShowName
                                                        if (item.ParamElement == ((int)Git.Storage.Common.Enum.EElementType.Date).ToString())
                                                        {
                                                            <input name="arg_@item.ParamName.Replace("@","")" type="text" class="input-medium arg" placeholder="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
                                                        }
                                                        else if (item.ParamElement == ((int)Git.Storage.Common.Enum.EElementType.DateTime).ToString())
                                                        {
                                                            <input name="arg_@item.ParamName.Replace("@","")" type="text" class="input-medium arg" placeholder="" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
                                                        }
                                                        else
                                                        {
                                                            <input name="arg_@item.ParamName.Replace("@","")" type="text" class="input-medium arg" placeholder=""/>
                                                        }    
                                                    }
                                                    <a class="btn btn-info" href="javascript:void(0)" data-command="search"><i class="icon-search"></i>&nbsp;搜索</a>
                                                }
                                            </div>
                                        </div>
                                    </form>
                                    
                                </div>

                                @ViewBag.WebReport.GetHtml()
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @Html.Partial("_Foot")
    <script src="/Theme/customer/Report/Git.Framework.Report.Customer.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function () {
            App.init();
            ReportShow.Init();
        });
    </script>
</body>
</html>